﻿using System;
using System.Collections.Generic;
using Allegro.TaskExecution;

namespace Allegro.Framework
{
    /// <summary>
    /// 
    /// </summary>
    public class CompleteDependentTask : Task, ITaskCompletion
    {
        private CompletionType _completionType = CompletionType.All;

        /// <summary>
        /// 
        /// </summary>
        public CompleteDependentTask()
        {
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="completionType"></param>
        public CompleteDependentTask(CompletionType completionType)
        {
            _completionType = completionType;
        }
        /// <summary>
        /// 
        /// </summary>
        public CompletionType Type
        {
            get { return _completionType; }
            set { _completionType = value; }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="tasks"></param>
        /// <param name="context"></param>
        public void DependsOn(IEnumerable<ITask> tasks, IExecutionContext context)
        {
            foreach(ITask t in tasks)
            {
                DependsOn(t);
            }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        protected override void ExecuteTask(IExecutionContext context)
        {
            throw new System.NotImplementedException();
        }
    }
}
